import { data } from 'jquery';
import request from '../utils/request'

//获得购物车的所有信息
export const getCartList = async function(){
   const res = await request.get("/cart");
   return res.data;
} 
//删除购物车中指定Id的产品
export const deleteCartProductById=async function(id){
   await request.delete("/cart/"+id);
}
//添加产品进购物车
export const addProductToCart= async function(cart){
   await request.post("/cart",cart)
}

//修改数量
export const updateProductNum = async function(cart){
   await request.put("/cart",cart);
}
